package com.sync.data.ievent.entity;

import com.sync.data.base.BaseEntity;
import com.sync.data.common.annotation.FieldProps;
import com.sync.data.common.annotation.FieldType;
import com.sync.data.common.annotation.RenderType;
import com.sync.data.common.obj.annoation.ObjectPrefix;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * @Description: 成本中心表
 * @Author: ievent-boot
 * @Date: 2022-03-01
 * @Version: V1.0
 */

@Getter
@Setter
@Entity
@ObjectPrefix("mccs")
public class BaseCostCenter extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 成本中心编号
     */
    @FieldProps(type = FieldType.STRING, label = "成本中心编号")
    private String costCenterCode;

    /**
     * 成本中心名称
     */
    @FieldProps(type = FieldType.STRING, label = "成本中心名称")
    private String costCenterName;

    /**
     * 成本中心描述
     */
    @FieldProps(type = FieldType.STRING, label = "成本中心描述")
    private String costCenterDesc;

    /**
     * 开始日期
     */
    @FieldProps(type = FieldType.DATE, label = "开始日期", renderType = RenderType.DatePicker)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginDate;

    /**
     * 结束日期
     */
    @FieldProps(type = FieldType.DATE, label = "结束日期", renderType = RenderType.DatePicker)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    /**
     * 成本中心类型
     */
    @FieldProps(type = FieldType.STRING, label = "成本中心类型")
    private String costCenterType;

    /**
     * 成本中心所属BU
     */
    @FieldProps(type = FieldType.STRING, label = "成本中心所属BU")
    private String costCenterBu;

    @FieldProps(type = FieldType.STRING, label = "公司代码")
    private String legacyId;

    /**
     * 是否生效
     */
    @FieldProps(type = FieldType.STRING, label = "是否生效")
    private Integer isActive;

    /**
     * 删除状态
     */
    @FieldProps(type = FieldType.STRING, label = "删除状态")
    private Integer delFlag;


    @FieldProps(type = FieldType.STRING, label = "owner Id")
    private String sysUserId;
}
